package 带有缓冲区的字符流;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class 带有缓冲的字符输入流 {
    public static void main(String[] args) {
        FileReader reader = null;
        BufferedReader bufferedReader = null;
        try {
            reader = new FileReader("IO流/src/myfile");
            bufferedReader = new BufferedReader(reader);
            String line= null;
            while ((line = bufferedReader.readLine()) != null){
                System.out.println(line);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                bufferedReader.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }

    }
}
